const uploader = require('../utils/fileUpload')

module.exports = async ctx => {
  // 获取上传之后的结果
  // 具体可以查看：
  try {
    const data = await uploader(ctx.req)

    //imgUrl:'',
    //size: '',
    //mimeType: '',
    //name: ''

    ctx.state.data = { status:'0',msg:data}
  } catch (e) {
    ctx.state.data = { status: '-1', msg: e.message }
  }

}